<template>
	<view>
		<view class="mainpadding_top ffffff flexbetween">
			<view class="titletext bold hei_text">電影名稱</view>
			<input class="main_size bold hei_text" type="text" placeholder="請輸入電影名稱" style="text-align: right;">
		</view>
		<view class="mainpadding_top ffffff">
			<view class="titletext bold hei_text">電影主圖（0/1）</view>
			<view class="flexleft flex_wrap">
				<view class="itemimgBox flexcenter margin_top2" v-for="item in 2"><!-- 已上传 -->
					<image class="listleftimg radius"
						src="https://xunbo.yuntaiqikeji.com/uploads/20230725/5f1a390c01eae149ad8ef40aa05efffa.jpg"
						mode=""></image>
					<view class="deleteimg"></view>
				</view>
				<view class="itemimgBox flexcenter margin_top2"><!-- 未上传 -->
					<image class="listleftimg radius" src="@/static/image/system/upimg.png" mode=""></image>
				</view>
			</view>
		</view>
		<view class="mainpadding_top ffffff flexbetween">
			<view class="titletext bold hei_text">導演</view>
			<input class="main_size bold hei_text" type="text" placeholder="請輸入導演" style="text-align: right;">
		</view>
		<view class="mainpadding_top ffffff flexbetween">
			<view class="titletext bold hei_text">類型</view>
			<input class="main_size bold hei_text" type="text" placeholder="請輸入類型" style="text-align: right;">
		</view>
		<view class="mainpadding_top ffffff flexbetween">
			<view class="titletext bold hei_text">主演</view>
			<input class="main_size bold hei_text" type="text" placeholder="請輸入主演" style="text-align: right;">
		</view>
		<view class="mainpadding_top ffffff flexbetween">
			<view class="titletext bold hei_text">時長</view>
			<input class="main_size bold hei_text" type="text" placeholder="請輸入時長" style="text-align: right;" >
		</view>
		<view class="mainpadding_top ffffff flexbetween">
			<view class="titletext bold hei_text">上映規格</view>
			<view class="flexright" @click="jumpurl('/pages/workbench/dianyingsygg')">
				<input class="main_size bold hei_text" type="text" placeholder="請選擇上映時間" disabled="" v-model="time"
					style="text-align: right;">
				<u-icon name="arrow-right" color="#999" size="16"></u-icon>
			</view>
		</view>
		<view class="mainpadding_top ffffff flexbetween">
			<view class="titletext bold hei_text">電影院名稱</view>
			<input class="main_size bold hei_text" type="text" placeholder="請輸入電影院名稱" style="text-align: right;" >
		</view>
		<view class="mainpadding_top ffffff flexbetween">
			<view class="titletext hei_text bold">所在地區</view>
			<uni-data-picker  @change="bindPickerChange" :localdata="items" v-model="address.county" >
				<view class="flexright">
					<input class="hei_text main_size bold" type="text" style="text-align: right;" v-model="addressdetail" placeholder="請選擇所在地址">
					<u-icon name="arrow-right" color="#999" size="16"></u-icon>
				</view>
				
			</uni-data-picker>
		</view>
		<view class="mainpadding_top ffffff flexbetween">
			<view class="titletext bold hei_text">詳細地址</view>
			<view class="flexright">
				<input class="hei_text main_size bold" type="text" style="text-align: right;" disabled placeholder="請選擇詳細地址">
				<u-icon name="arrow-right" color="#999" size="16"></u-icon>
			</view>
		</view>
		<view class="mainpadding_top ffffff flexbetween">
			<view class="titletext bold hei_text">關聯商品</view>
			<view class="flexright" @click="jumpurl('/pages/workbench/tianjiady?type=1')">
				<input class="hei_text main_size bold" type="text" style="text-align: right;" placeholder="請選擇關聯商品">
				<u-icon name="arrow-right" color="#999" size="16"></u-icon>
			</view>
		</view>
		<view class="mainpadding_top ffffff">
			<view class="titletext bold hei_text">商品購買須知</view>
			<textarea placeholder="請輸入內容" class="main_size margin_top bold hei_text" style="height: 150rpx;" />
		</view>
		<view class="mainpadding">
			<view class="submitbtn">確認</view>
		</view>
		
	</view>
</template>

<script>
	import citys from "../../static/city/city.js"
	export default {
		data() {
			return {
				listid: "",
				
				addressdetail:"",//详細地址
				address:{
					province: "", //省
					city: "", //市
					county: "", //區
				},
				items: citys.data,
			}
		},
		onLoad(options) {
			if(options.id){
				this.listid = options.id
				uni.setNavigationBarTitle({
					title:"編輯電影"
				})
			}
		},
		methods: {
			jumpurl(url){
				uni.navigateTo({
					url
				})
			},
			bindPickerChange(val) {
				let area = val.detail.value
				let areas = [area[0].text, area[1].text, area[2].text];
				this.addressdetail = JSON.parse(JSON.stringify(areas.join("/")));
				this.address.province = area[0].value;
				this.address.city = area[1].value;
				this.address.county = area[2].value;
			},
		}
	}
</script>

<style>

</style>
